<?php get_header(); ?>

		<div id="content">
			<div class="main" id="top">

	<?php if (have_posts()) : ?>
 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
 	  <?php /* If this is a category archive */ if (is_category()) { ?>
		<h5 class="pagetitle">Archive for the "<?php single_cat_title(); ?>" Category</h5>
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
		<h5 class="pagetitle">Posts Tagged "<?php single_tag_title(); ?>"</h5>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h5 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h5>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h5 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h5>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h5 class="pagetitle">Archive for <?php the_time('Y'); ?></h5>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h5 class="pagetitle">Author Archive</h5>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h5 class="pagetitle">Blog Archives</h5>
 	  <?php } ?>
		<?php while (have_posts()) : the_post(); ?>

				<div class="post" id="post-<?php the_ID(); ?>">
					<div class="title"><div class="post-tape png"></div>
						<div class="tit"><h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
							<span class="author">Posted by: <?php the_author() ?></span><span class="categories">in <?php the_category(', ') ?></span>
							<?php /* If this is a category archive */ if (is_category()) { ?>
								<span class="categories"><? the_tags( 'Tags: ', ', ', ' '); ?></span>
							<? } else { ?>
								<span class="categories">in <?php the_category(', ') ?></span>
							<? } ?>
							<div class="date"><?php the_time('j') ?><div class="month"><?php the_time('M') ?></div></div>
						</div>
					</div>
					<div class="entry">
					
						<?php if (function_exists('the_excerpt_reloaded')) 
							the_excerpt_reloaded(145, '<a><img>', 'excerpt', TRUE, 'Read the full post...');
						else
							the_content('Read the rest of this entry »');
						?>
						<?php /* If this is a category archive */ if (is_category()) { } else { the_tags( '<p>Tags: ', ', ', '</p>'); } ?>
					</div>
				</div>
				<div class="postmetadata"><span class="right"><?php edit_post_link('Edit', ' ', ' '); ?></span><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>

    <?php endwhile; ?>
	<?php else : ?>

				<div class="post min-h250">
					<h2 class="center">Not Found</h2>
					<p class="center">Sorry, but you are looking for something that isn't here.</p>
				</div>
	
	<?php endif; ?>
			</div>
		</div>
	</div></div></div>
	<div class="sheet-bottom png"></div>
	<div class="pagenav">
		<del class="container">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
				<div class="wp-pagenavi2"><?php next_posts_link('Previous Entries') ?> <?php previous_posts_link('Next Entries') ?></div>
			<?php } ?>
		</del>
	</div>
	
	<?php get_sidebar(); ?>
	
</div></div>
</div></div></div>

<?php get_footer(); ?>